<template>
  <q-btn @click="handleClick" />
</template>

<script lang="ts">
import { emitter } from 'src/emitter';
import { defineComponent } from 'vue';

export default defineComponent({
  name: 'table-export-btn',

  props: {
    id: {
      type: String,
    },
    title: {
      type: String,
      require: true,
      defalute: '',
    },
  },

  setup(props) {
    const handleClick = () => {
      emitter.emit('table_export', { id: props.id, title: props.title });
    };

    return { handleClick };
  },
});
</script>
